//
//  EmploymentListCell.m
//  CenturyCity
//
//  Created by beisheng03 on 2017/12/26.
//  Copyright © 2017年 beisheng. All rights reserved.
//

#import "EmploymentListCell.h"
@interface EmploymentListCell ()

@property (weak, nonatomic) IBOutlet UILabel *topLeftLabel;
@property (weak, nonatomic) IBOutlet UILabel *bottomLeftLabel;
@property (weak, nonatomic) IBOutlet UILabel *topRightLabel;
@property (weak, nonatomic) IBOutlet UILabel *bottomRightLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *rightLabelW;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomMargin;

@end
@implementation EmploymentListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.topLeftLabel.font = [UIFont boldSystemFontOfSize:16];
    
    self.bottomLeftLabel.font = MYFONT(15);
    
    self.bottomLeftLabel.textColor = darkGray;
    
    self.bottomRightLabel.textColor = darkGray;
    
    self.topRightLabel.font = MYFONT(16);
    
    self.topRightLabel.textColor = [UIColor orangeColor];
    
    self.bottomRightLabel.font = MYFONT(15);
    
    self.bottomMargin.constant = 10;
    
    self.contentView.backgroundColor = [UIColor whiteColor];
    // Initialization code
}


//@property (nonatomic, strong) NSString *position_class_name;
//
//@property (nonatomic, strong) NSString *position_life_name;
//
//
//@property (nonatomic, strong) NSString *position_education_name;
- (void)setModel:(EmploymentListModel *)model{
    _model = model;
    
    self.topRightLabel.text = [NSString stringWithFormat:@"%@",_model.position_salary];
    
 
    CGSize size = [self.topRightLabel.text sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:MYFONT(16), NSFontAttributeName, nil]];
    
    self.rightLabelW.constant = size.width + 16;

//    return CGSizeMake(size.width + 12,26);
    
    self.topLeftLabel.text = _model.position_name;
    
//    self.topLeftLabel.text = @"这就说明了这些小触手和hcg的莫大联系hcg能够反应这些小触手是否在正常地生长，也就说明了宝宝是否在正常发育只要hcg能够正常翻倍";
    
    self.bottomLeftLabel.text = [NSString stringWithFormat:@"%@ | %@ | %@",_model.position_class_name,_model.position_education_name,_model.position_life_name];
    
    
    self.bottomRightLabel.text = _model.position_createtime;
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
